using System.Collections.Generic;
using System.Threading.Tasks;
using VOL.demo.IRepositories;
using VOL.Entity.DomainModels;

namespace VOL.demo.Services
{
    public partial class producttypemodelService
    {
        /// <summary>
        /// 获取所有货品类型（级联结构）
        /// </summary>
        /// <returns></returns>
        public async Task<List<producttypemodel>> GetCascadeListAsync()
        {
            return await repository.GetCascadeListAsync();
        }

        /// <summary>
        /// 根据条件查询货品类型
        /// </summary>
        /// <param name="predicate">查询条件</param>
        /// <returns></returns>
        public List<producttypemodel> Find(System.Linq.Expressions.Expression<System.Func<producttypemodel, bool>> predicate)
        {
            return repository.Find(predicate);
        }
    }
}
